package com.sgb.kjwl.view.ui.adapter.transport;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sgb.kjwl.R;
import com.sgb.kjwl.model.entity.transport.DiyFieldEntity;
import com.sgb.kjwl.utils.DefaultUtil;
import com.sgb.link.view.widget.ExpandedTextView;

import org.jetbrains.annotations.NotNull;

import java.util.List;

public class DiyAdapter extends BaseQuickAdapter<DiyFieldEntity, BaseViewHolder> {
    public DiyAdapter(List<DiyFieldEntity> data) {
        super(R.layout.item_diy_key, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder holder, DiyFieldEntity entity) {

        holder.setText(R.id.tv_item_key, DefaultUtil.getString(entity.getKey()));
        //
        TextView moreView = holder.getView(R.id.tv_item_value);
        moreView.setText(DefaultUtil.getString(entity.getValue()));
        new ExpandedTextView().showTextT(holder.getView(R.id.tv_item_value), holder.getView(R.id.note_on_off));
    }
}
